package com.hyf.ucenter.util;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

// 微信登陆工具累
@Component
public class ConstantPropertiesUtil implements InitializingBean {
	
	// 微信接口id
	@Value("${wx.open.app_id}")
	private String appId;

	// 微信接口密钥
	@Value("${wx.open.app_secret}")
	private String appSecret;

	// 微信接口地址
	@Value("${wx.open.redirect_url}")
	private String redirectUrl;

	
	public static String WX_OPEN_APP_ID;

	public static String WX_OPEN_APP_SECRET;

	public static String WX_OPEN_REDIRECT_URL;
	
	@Override
	public void afterPropertiesSet() throws Exception {
		WX_OPEN_APP_ID = appId;
		WX_OPEN_APP_SECRET = appSecret;
		WX_OPEN_REDIRECT_URL = redirectUrl;
	}
}
